import React from 'react'

import Header from '../../header/Header'
import ZhouQi from '../ui/ZhouQI'
import All from '../ui/All'
import InfoUi from '../ui/InfoUi'
import { useDispatch,useSelector } from 'react-redux'
import { useEffect } from 'react'
import { useLocation } from 'react-router-dom'


const  DkInfo = () => {
  const location = useLocation()
  let id = location.pathname.split("/")[2]
  let data = useSelector(state => state.daka.list)
  data = data[id]
  console.log(data)
  const dispatch = useDispatch()
  useEffect(()=>{
    // dispatch(loadAsync())
  },[dispatch])
  return ( 
    <div style={{        
      overflowY:'scroll',
      height:'100%',width:'100%'}}>
      <Header
        title='打卡详情'
        back='true'
        bgc='rgba(48,139,254)'
      ></Header>
      <div style={{
        height:'100%',
        paddingTop:'.44rem',
        overflowY:'scroll',
      }}>
      <InfoUi info={data} ></InfoUi>
      <ZhouQi></ZhouQi>
      <All></All>
      </div>

      
    </div>
   );
}
 
export default DkInfo ;